﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IBupro.Models.StudentModel>" %>
<%@ Import Namespace="IBupro.Extensions" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%: Html.Translate("editStudentProfile") %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2><%: Html.Translate("editOwnProfile") %></h2>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
    
        <fieldset>
            
            <div class="editor-label">
                <%: Html.Translate("firstName") %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.FirstName) %>
                <%: Html.ValidationMessageFor(model => model.FirstName) %>
            </div>
            
            <div class="editor-label">
               <%: Html.Translate("lastName") %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.LastName) %>
                <%: Html.ValidationMessageFor(model => model.LastName) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Email) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Email) %>
                <%: Html.ValidationMessageFor(model => model.Email) %>
            </div>
            <%if (User.IsInRole("Student")){%>
            
            <div class="editor-label">
                <%:Html.LabelFor(model => model.StudentField)%>
            </div>
            <div class="editor-field">
                <%:Html.DropDownList("StudentField", Model.GetStudentFieldSelectList(Model.StudentField))%>
            </div>
            <% }%>
           

            <div class="editor-label">
                <%:Html.Translate("oldPassword")%>
            </div>
            <div class="editor-field">
                <%: Html.PasswordFor(model => model.OldPassword) %>
            </div>

             <div class="editor-label">
                <%:Html.Translate("newPassword")%>
            </div>
            <div class="editor-field">
                <%: Html.PasswordFor(model => model.NewPassword) %>
            </div>

             <div class="editor-label">
                <%:Html.Translate("confirmPassword")%>
            </div>
            <div class="editor-field">
                <%: Html.PasswordFor(model => model.ConfirmPassword) %>
            </div>
            
            <p>
                <input type="submit" value="<%:Html.Translate("save")%>" />
            </p>
        </fieldset>

    <% } %>


</asp:Content>

